{% extends "base.html" %}

{% block title %}Home - Flask Blueprints Demo{% endblock %}

{% block content %}
<h1>Flask Blueprints Demo</h1>
<p class="lead">Chapter 6: Application Organization with Blueprints</p>

<div class="row">
    <div class="col-md-12">
        <p>This demo showcases application organization techniques using Flask Blueprints.</p>
        
        <h3>Blueprints in this Demo:</h3>
        <div class="row">
            <div class="col-md-6">
                <div class="card">
                    <div class="card-header">
                        <h5>Main Blueprint</h5>
                    </div>
                    <div class="card-body">
                        <p>Handles core application pages like the home page and about page.</p>
                        <a href="{{ url_for('main.about') }}" class="btn btn-primary">About Main</a>
                    </div>
                </div>
            </div>
            
            <div class="col-md-6">
                <div class="card">
                    <div class="card-header">
                        <h5>Blog Blueprint</h5>
                    </div>
                    <div class="card-body">
                        <p>Manages blog functionality including posts and comments.</p>
                        <a href="{{ url_for('blog.index') }}" class="btn btn-primary">Visit Blog</a>
                    </div>
                </div>
            </div>
            
            <div class="col-md-6">
                <div class="card">
                    <div class="card-header">
                        <h5>Admin Blueprint</h5>
                    </div>
                    <div class="card-body">
                        <p>Provides administrative functionality for managing users and content.</p>
                        <a href="{{ url_for('admin.dashboard') }}" class="btn btn-primary">Admin Dashboard</a>
                    </div>
                </div>
            </div>
            
            <div class="col-md-6">
                <div class="card">
                    <div class="card-header">
                        <h5>API Blueprint</h5>
                    </div>
                    <div class="card-body">
                        <p>Exposes RESTful API endpoints for external applications.</p>
                        <a href="{{ url_for('api.docs') }}" class="btn btn-primary">API Documentation</a>
                    </div>
                </div>
            </div>
        </div>
        
        <h3 class="mt-4">Key Concepts Demonstrated:</h3>
        <ul>
            <li>Blueprint creation and registration</li>
            <li>Modular application structure</li>
            <li>URL prefixing for organized routing</li>
            <li>Template sharing across blueprints</li>
            <li>Error handling within blueprints</li>
            <li>Static file organization</li>
        </ul>
    </div>
</div>
{% endblock %}